import request from '@/utils/request'

// 查询物料需求计划（MRP）产品列表
export function listMrpLine(query) {
  return request({
    url: '/mrp/mrpLine/list',
    method: 'get',
    params: query
  })
}

// 查询物料需求计划（MRP）产品详细
export function getMrpLine(lineId) {
  return request({
    url: '/mrp/mrpLine/' + lineId,
    method: 'get'
  })
}

// 新增物料需求计划（MRP）产品
export function addMrpLine(data) {
  return request({
    url: '/mrp/mrpLine',
    method: 'post',
    data: data
  })
}

// 批量新增物料需求计划（MRP）产品
export function addMrpLineBatch(data) {
  return request({
    url: '/mrp/mrpLine/addBatch',
    method: 'post',
    data: data
  })
}

// 修改物料需求计划（MRP）产品
export function updateMrpLine(data) {
  return request({
    url: '/mrp/mrpLine',
    method: 'put',
    data: data
  })
}

// 批量修改物料需求计划（MRP）产品
export function updateMrpLineBatch(data) {
  return request({
    url: '/mrp/mrpLine/updateBatch',
    method: 'put',
    data: data
  })
}

// 删除物料需求计划（MRP）产品
export function delMrpLine(lineId) {
  return request({
    url: '/mrp/mrpLine/' + lineId,
    method: 'delete'
  })
}
